//
// Created by ych on 2/13/24.
//
#include "ych_exception.h"

jmp_buf exception_buffer1;
jmp_buf exception_buffer2;
int mode;
int exception_val;

void throw(int val){
    exception_val = val;
    if (mode == 1)
        longjmp(exception_buffer1, val);
    else
        longjmp(exception_buffer2, val);
}